Skip to content

Fix Android keyboard not reappearing after dismissal in search inputs#1922

Draft
Copilot wants to merge 5 commits intodevelopmentfrom
copilot/fix-search-bar-keyboard-issue
Draft

Fix Android keyboard not reappearing after dismissal in search inputs#1922
Copilot wants to merge 5 commits intodevelopmentfrom
copilot/fix-search-bar-keyboard-issue

Conversation

Copy link
Contributor

Copilot AI commented Mar 9, 2026

On Android, after dismissing the keyboard (swipe down), tapping the search input again doesn't bring the keyboard back. This is a known React Native focus issue on Android.

Solution

Wrap TextInput/SearchInput with Pressable that calls focus() on press, forcing the keyboard to appear:

const handleSearchInputPressIn = () => {
  if (Platform.OS === 'android') {
    searchInputRef.current?.focus();
  }
};

<Pressable onPressIn={handleSearchInputPressIn}>
  <SearchInput ref={searchInputRef} ... />
</Pressable>

Files Changed

  • ai-chat.tsx — AI chat composer input, also added showSoftInputOnFocus prop
  • trip/location-search.tsx — Trip location search
  • weather/LocationSearchScreen.tsx — Weather location search
  • weather/LocationsScreen.tsx — Saved locations search
  • catalog/PackSelectionScreen.tsx — Pack selection search
  • catalog/CatalogBrowserModal.tsx — Catalog browser search

All handlers only trigger on Android to avoid affecting iOS behavior.

Original prompt

This section details on the original issue you should resolve

<issue_title>Android- Packrat-AI Search Bar Keyboard Issue</issue_title>
<issue_description>
Description
Issue with keyboard not appearing after hiding and re-trying to type in search bar while using AI service. Same with the location search bar while adding a location.

Steps to reproduce the bug
    1. Open app and access AI service
    2. Tap on search bar and start typing
    3. Pull down the keyboard to hide it
    4. Try to tap on the search bar again to continue typing

Screen Recording of the issue

WhatsApp.Video.2026-03-10.at.2.01.52.AM.mp4

Expected result
Keyboard should appear, allowing me to continue typing.

Actual result
Keyboard doesn't appear, can't continue typing without leaving the chat and re-entering.

Environnement

  • Device: One Plus 8

Any additional notes
Happened consistently in multiple tries. Might be specific to this flow or screen size.</issue_description>

<agent_instructions>Keyboard doesnt reappear again when you retap input after dismissing it the first time</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits March 9, 2026 21:51
…g dismissed

Co-authored-by: mikib0 <54102880+mikib0@users.noreply.github.com>
…howSoftInputOnFocus

Co-authored-by: mikib0 <54102880+mikib0@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix keyboard not appearing after hiding in search bar Fix Android keyboard not reappearing after dismissal in search inputs Mar 9, 2026
@andrew-bierman
Copy link
Collaborator

👋 @copilot

@andrew-bierman
Copy link
Collaborator

@copilot

@andrew-bierman
Copy link
Collaborator

@copilot

@andrew-bierman
Copy link
Collaborator

@copilot

…arch-bar-keyboard-issue

# Conflicts:
#	apps/expo/features/catalog/screens/PackSelectionScreen.tsx
@cloudflare-workers-and-pages
Copy link
Contributor

cloudflare-workers-and-pages bot commented Mar 17, 2026

Deploying packrat-landing with  Cloudflare Pages  Cloudflare Pages

Latest commit: 68c136a
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link
Contributor

Deploying packrat-guides with  Cloudflare Pages  Cloudflare Pages

Latest commit: 68c136a
Status:🚫  Build failed.

View logs

SearchInputRef is not exported from @packrat/ui/nativewindui. Use
React Native's TextInput type for search input refs instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants